@echo off

set JLINKEXE=jlink.exe
set DEVICE=EFR32BG1PXXXF256
set LOADPORT=swd
set SPEED=4000
set JLINK_OPTIONS="-device EFR32BG1PXXXF256 -if swd -speed 4000"
set BINPATH=%1%
set FLASH_START_ADDRESS=0x0

echo r>flash.jlink
echo loadbin %BINPATH% %FLASH_START_ADDRESS%>>flash.jlink
echo r>>flash.jlink
echo g>>flash.jlink
echo q>>flash.jlink

::echo %BINPATH%

%JLINKEXE% -device %DEVICE% -if %LOADPORT% -speed %SPEED% flash.jlink

del flash.jlink

pause
